package com.xiangxiao.rpan.storage.service;

import com.xiangxiao.rpan.storage.dto.BigFileBean;
import com.xiangxiao.rpan.storage.dto.BigFileDto;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;

/**
 * @auther xiangxiao
 * @email 573768011@qq.com
 * @data 2023/9/6 14:43
 */
public interface UploadService {
  /**
   * 上传大文件
   *
   * @param bigFile
   * @return
   */
  BigFileDto uploadBigFile(BigFileBean bigFile);

  /**
   * 从网络请求获取文件信息
   *
   * @param file
   * @param fileMD5
   * @param fileSize
   * @param totalChunks
   * @param currChunks
   * @return
   */
  BigFileBean getParametersFromRequest(MultipartFile file, String fileMD5, Long fileSize,
                                       int totalChunks, int currChunks);
}
